package com.yitong;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class demo8 {
    public static void main(String[] args) throws IOException {
        ServerSocket ss =new ServerSocket(1000);

        Socket socket = ss.accept();

        BufferedReader br=new BufferedReader(new InputStreamReader(socket.getInputStream()));

        String line;
        while((line=br.readLine())!=null){
            System.out.println(line);
        }
        ss.close();
    }
}
